<?php
namespace Modules\Home\Controllers;

class GoodsRepeatedController extends ControllerBase {
  public function initialize() {
    $this -> _checkLogin();
  }

  public function repeatedAction() {
    $sessionGetUser = $this -> session -> get('user');

    $post = $this -> request -> getPost();
    $findFirstUser = \Common\Models\UserModel::findFirst('user_id = "' . $sessionGetUser['user_id'] . '"');
    if(!$findFirstUser || !$this -> security -> checkHash($post['safe_password'], $findFirstUser -> safe_password)) {
      return $this -> _returnScript('二级密码错误');
    }

    return $this -> _returnScript('重消成功!', '/finance');
  }
}
?>